const url = require('url');
// let urlString = 'http:47.95.207.1:3000/fcj/recommend/hot/hehe?us=123&ps=567#nihao'
// let urlObj = url.parse(urlString);
// console.log(urlObj);
let obj = {
  protocol: 'http:',
  slashes: null,
  auth: null,
  host: null,
  port: null,
  hostname: null,
  hash: '#nihao',
  search: '?us=123&ps=567',
  query: 'us=123&ps=567',
  pathname: '47.95.207.1:3000/fcj/recommend/hot/hehe',
  path: '47.95.207.1:3000/fcj/recommend/hot/hehe?us=123&ps=567',
  href: 'http:47.95.207.1:3000/fcj/recommend/hot/hehe?us=123&ps=567#nihao'
};
let string = url.format(obj);
console.log(string);

